<template>
    <div>
      <van-nav-bar title="拜访记录" left-arrow @click-left="goback">
      <template #right>
        <span style="color: #fff; marginright: 10px" @click="govsitXZ">新增</span>
      </template>
    </van-nav-bar>
    <van-search show-action placeholder="请输入搜索关键词">
      <template #action>
        <div>搜索</div>
      </template>
    </van-search>
    <div class="textQXia">
          <ul>
            <li v-for="(item,index) in records" :key="index">
              <div class="li-div">
                <img
                  src="../assets/客户中心/合作伙伴.png"
                  width="50px"
                  alt=""
                />
                <div>
                  <p>拜访标题 <span>{{item.visitTitle}}</span></p>
                  <p>客户名称 <span>{{item.custName}}</span></p>
                  <p>拜访时间 <span>{{item.visitTime}}</span></p>
                </div>
              </div>
              <div class="log">定期回访</div>
            </li>
          </ul>
        </div>
    </div>
</template>

<script>
import {visit} from '../request/api'
export default {
    data () {
        return {
          records:[]
 
        }
    },
    methods:{
        goback(){
            this.$router.push('/custlist')
        },
        govsitXZ(){
            this.$router.push('/vsitXZ')
        }
    },
    created(){
        visit().then(res=>{
            this.records=res.data.records
        })
    }
}
</script>
 
<style lang = "less" scoped>
    /deep/ .van-nav-bar__content {
  background: #003399;
  .van-nav-bar__title {
    color: #fff;
  }
  .van-icon {
    color: #fff;
  }
}
.textQXia {
  background-color: #fff;
  width: 90%;
  padding: 10px;
  margin: 10px auto;
  ul {
    li {
      border-bottom: 1px solid #ccc;
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
      padding: 10px;
      box-sizing: border-box;
      .li-div {
        display: flex;
        align-items: center;
        p {
          color: #999;
          margin: 5px 10px;
          font-size: 14px;
          span{
              color: #333;
          }
        }
      }
      .log{
          width: 80px;
          height: 25px;
          background-color: #fff7e7;
          border: 1px solid #f7af52;
          color: #f7af52;
          text-align: center;
          line-height: 25px;
          border-radius: 5px;
      }
    }
  }
}
</style>